package ${controllerPackage};

import ${serviceClass}.${ServiceName};
import ${entityClass}.${EntityName};
import com.xzc.one.common.inout.ResponseBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMethod;

${comment}
@RestController
@RequestMapping("/${entityName}")
public class ${EntityName}Controller {

@Autowired
private ${ServiceName} ${serviceName};

@RequestMapping(value = "/insert${EntityName}", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
public ResponseBody insert${EntityName}(@RequestBody ${EntityName} ${entityName}) {
${serviceName}.insert${EntityName}(${entityName});
return ResponseBody.success("增加成功");
}
}
